package cn.xiaolang.function.jdk8.functional_interface;

import java.util.function.Function;
import java.util.function.Predicate;

/**
 * 断言性接口
 * <p>
 * 断言型接口，对类型T进行条件筛选操作，返回boolean，包含方法 boolean test（T t）
 * </p>
 *
 * @author fuhw/Dean
 * @date 2019-07-19
 */
public class PredicateInterface {

    public static void main(String[] args) {
        System.out.println(handle("12", a -> a.length() < 3));
    }


    private static boolean handle(String param, Predicate<String> predicate) {
        return predicate.test(param);
    }
}
